package com.shouxin.attendance.activity;

import android.content.DialogInterface;
import android.support.v7.app.AlertDialog;
import android.view.View;

import com.shouxin.attendance.R;
import com.shouxin.attendance.constants.PrefKey;
import com.shouxin.attendance.utils.SharedPref;

public class AboutActivity extends BaseActivity{

    @Override
    protected void setContentView() {
        setContentView(R.layout.activity_about);
    }

    @Override
    protected void initUIViews() {

    }

    @Override
    protected void initData() {

    }

    @Override
    protected void bindEvents() {

    }

    public void clickTrailSwitch(View view) {
        AlertDialog dialog = new AlertDialog.Builder(this).setTitle("隐藏开关").setMessage("当前处于试用期阶段，是否需要结束试用转正式使用？")
                .setPositiveButton("是", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        SharedPref.putBoolean(PrefKey.TRAIL_SWITCH, false);
                    }
                }).setNegativeButton("否", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        SharedPref.putBoolean(PrefKey.TRAIL_SWITCH, true);
                    }
                }).create();
        dialog.show();
    }
}
